package com.consumer2.third.controller;

import com.feign1.api.dto.Dto1;
import com.feign1.api.impl.TestControllerApi;
import com.feign1.api.param.Param1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RestController
public class ConsumerController {
    @Autowired
   private TestControllerApi testControllerApi;

    @GetMapping("/api")
    public Dto1 callback() {
        Param1 data=new Param1();
        data.setName("123213");
        Dto1 dto1=  testControllerApi.callback(data);
        return dto1;
    }
}
